#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
B站视频下载器主程序入口
"""

import sys
import os
import pygame

# 添加项目根目录到系统路径
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))

from bilibili_downloader.ui.app import App

def main():
    """主函数"""
    # 初始化pygame
    pygame.init()
    pygame.font.init()
    
    # 打印系统中可用的字体
    print("系统中可用的字体:")
    fonts = pygame.font.get_fonts()
    chinese_fonts = [f for f in fonts if f in ["microsoftyahei", "simhei", "simsun", "nsimsun"]]
    print(f"可能支持中文的字体: {chinese_fonts}")
    
    app = App()
    app.run()

if __name__ == "__main__":
    main()
